﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExpressionEngine
{
    /// <summary>
    /// 表达式中的基本操作符号：+，-，*，/,%,&&,||
    /// </summary>
    public class Operator : OperationSymbol
    {
        private OperatorHandler _handler = null;
        public Operator(OperatorHandler expHandler) { this._handler = expHandler; }

        /// <summary>
        /// 操作符计算
        /// </summary>
        /// <returns></returns>
        public override Variable operate()
        {
            return this._handler.operate(this);
        } 
    }
}
